package com.tanner.mapreducedemo.comparableWithPatitioner;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @author zhang.t.c
 * @date 2021/7/18
 */
public class FlowReducer extends Reducer<FlowBean, Text, Text, FlowBean> {
    int upsum;
    int downsum;

    @Override
    protected void reduce(FlowBean flowBean, Iterable<Text> values, Context context) throws IOException, InterruptedException {

        for (Text value : values) {
            context.write(value, flowBean);
        }

    }
}
